import React from "react";
import Login from "@/components/business/login";
import BusinessIndex from '@/components/business/index'
import Profile from '@/components/business/profile'
import Email from '@/components/business/email'
import About from '@/components/business/about'
import Coupon from '@/components/business/coupon'

const list = [
    {
        path: "index",
        component: BusinessIndex,
        auth: true, // 需要校验用户是否登陆
    },
    {
        path: "login",
        component: Login,
    },
    {
        path: "profile",
        component: Profile,
        auth: true,
    },
    {
        path: "email",
        component: Email,
        auth: true,
    },
    {
        path: "about",
        component: About,
        auth: true,
    },
    {
        path: "coupon",
        component: Coupon,
        auth: true,
    },
]

//默认父组件 可以自己定义
const layout = () => {
    return (
        <>
            <React.Router.Outlet />
        </>
    )
}

export default [
    {
        path: "/business",
        component: layout,
        children: list
    }
]
